home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 23
/
AMIGAplus Sonderheft 23 (2000)(Falke)(DE)[!].iso
/
Tools
/
Text-Viewer
/
Notes
/
deutsch
/
Violinenschlüssel.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1999-11-06
|
43KB
|
1,425 lines
/* Unterprogramm für "Noten.pprx" */
signal on halt
signal on break_c
signal on break_e
signal on break_d
call ppm_SetStyle(N)
noteneingabe:
/* Kleinster notenabstand */
sysart = "Notensystemart:2"
systemart = ppm_Getform("Bitte noch einmal die gewählte Systemart eingeben. (2, 1v oder 1b)", 3, sysart)
select
when systemart == '2' then zdist = 4
when systemart == '1v' then zdist = 2
when systemart == '1b' then zdist = 2
otherwise noteneingabe()
end
zdist2 = zdist-2
xgrdform = "(1,2,4,8 oder 16)"
xgrd = ppm_GetForm("Bitte für den kleinsten Notenwert eingeben ... (NICHTS=ABBRUCH)", 3, xgrdform)
if xgrd == '' then exit_msg("Abbruch")
select
when xgrd == '1' then xg =0.7
when xgrd == '2' then xg =1.4
when xgrd == '4' then xg =2.8
when xgrd == '8' then xg =5.6
when xgrd == '16' then xg =11.2
otherwise notenwert()
end
/* Punktgröße der Noten */
notepkt = 26
call ppm_SetJustification(0)
zz = 0 /* Zeilenzähler */
notex = 0
notey = 0
page = ppm_CurrentPage()
clickpos:
res = ppm_GetUserText(2, "Manuell oder an Box ausrichten ? m/b")
if res == 'M' then res = 'm'
if res == 'B' then res = 'b'
select
when res == 'm' then
do
clickpos = ppm_GetClickPosition("Bitte die Stelle anklicken wo ich beginnen soll...")
if clickpos == 0 then
do
exit_msg("Falsche Eingabe !! ENDE !!")
end
else
do
notey = word(clickpos, 2)
notex = word(clickpos, 1)
if notex < 2.5 then notex = 2.5
xw = notex
yw = notey
if systemart ~= '2' then
do
if notey <= 3.3 then zz= 0 /* zz ist ZeilenZähler */
if ((notey > 3.5)&(notey < 5.3)) then zz = 2
if ((notey > 5.5)&(notey < 7.3)) then zz = 4
if ((notey > 7.5)&(notey < 9.3)) then zz = 6
if ((notey > 9.5)&(notey < 11.3)) then zz = 8
if ((notey > 11.5)&(notey < 13.3)) then zz = 10
if ((notey > 13.5)&(notey < 15.3)) then zz = 12
if ((notey > 15.5)&(notey < 17.3)) then zz = 14
if ((notey > 17.5)&(notey < 19.3)) then zz = 16
if ((notey > 19.5)&(notey < 21.3)) then zz = 18
if ((notey > 21.5)&(notey < 23.3)) then zz = 20
if ((notey > 23.5)&(notey < 25.3)) then zz = 22
if notey > 25.3 then noteneingabe()
end
else
do
if notey <= 3.3 then zz= 0
if ((notey > 5.5)&(notey < 7.3)) then zz = 4
if ((notey > 9.5)&(notey < 11.3)) then zz = 8
if ((notey > 13.5)&(notey < 15.3)) then zz = 12
if ((notey > 17.5)&(notey < 19.3)) then zz = 16
if ((notey > 21.5)&(notey < 23.3)) then zz = 20
end
end
end
when res == 'b' then
do
clickbox = ppm_ClickOnBox("Bitte eine Box anklicken, an der Stelle, wo es weitergeht ...")
pos = ppm_GetBoxPosition(clickbox)
notex = word(pos, 1)
notey = word(pos, 2)
xw = notex
yw = notey
call ppm_BoxAtPosn(notex, notey, page)
if notey <= 3.3 then zz= 0
if ((notey > 5.5)&(notey < 9.3)) then zz = 4
if ((notey > 9.5)&(notey < 13.3)) then zz = 8
if ((notey > 13.5)&(notey < 17.3)) then zz = 12
if ((notey > 17.5)&(notey < 21.3)) then zz = 16
if ((notey > 21.5)&(notey < 25.3)) then zz = 20
if notex <= 1 then
do
noteneingabe()
end
end
otherwise clickpos()
end
/* Zeigerbox */
zbid = ppm_CreateBox(notex, zz+0.5, 0.3, 1, 0)
call ppm_SetSize(26)
zbn = ppm_GetBoxName(zbid)
call ppm_TextIntoBox(zbn, '5')
notenwert:
do forever
cr = '0a'x
form = "Wert Name ['A'ufl.]"
call ppm_SetBoxPosition(zbid, notex, zz+0.5)
call ppm_UpdateScreen()
eingabe = ppm_GetForm("Bitte für die Noten eingeben ...(nichts=Abbruch) ", 7, form)
if eingabe = '' then
do
call ppm_DeleteBox(zbid)
exit_msg()
end
nw = word(eingabe, 1)
nn = word(eingabe, 2)
if nw == 'P' then nw = 'p'
al = word(eingabe, 3)
if al == 'A' then al = 'a'
IF nw == 'D' then nw = 'd'
if nw == 'LEFT' then nw = 'left'
if nw == 'L' then nw = 'l'
if nw == 'T' then nw = 't'
if nn == 'T' then nn = 't'
if nw == "NEU" then nw = "neu"
select
when nn=='GB2' then nn = 'Gb2'
when nn=='AB2' then nn = 'Ab2'
when nn=='DB3' then nn = 'Db3'
when nn=='EB3' then nn = 'Eb3'
when nn=='GB3' then nn = 'Gb3'
when nn=='AB3' then nn = 'Ab3'
when nn=='DB4' then nn = 'Db4'
when nn=='EB4' then nn = 'Eb4'
when nn=='GB4' then nn = 'Gb4'
when nn=='AB4' then nn = 'Ab4'
when nn=='DB5' then nn = 'Db5'
when nn=='EB5' then nn = 'Eb5'
otherwise NOP
end
/* x-Abstände der Noten zueinander */
select
when nw=='s' then
do
xw = xg/16
nw='x'
yv = 0
end
when nw=='S' then
do
xw = xg/16
nw='X'
yv = 0.47
end
when nw=='a' then
do
xw = xg/8
nw='e'
yv = 0
end
when nw=='A' then
do
xw = xg/8
nw='E'
yv = 0.47
end
when nw=='v' then
do
xw = xg/4
nw='q'
yv = 0
end
when nw=='V' then
do
xw = xg/4
nw='Q'
yv = 0.47
end
when nw=='h' then
do
xw = xg/2
yv = 0
end
when nw=='H' then
do
xw = xg/2
yv = 0.47
end
when nw=='g' then
do
xw = xg
nw='w'
yv = 0
end
when nw=='G' then
do
xw = xg
nw='W'
yv = 0.47
end
/* Sprung an den Anfang der Zeile */
when nw == 'left' then
do
call ppm_SetPagePosition(0, zz+1)
end
/* Punkt nach der Note - muß als erstes eingegeben werden falls gewünscht
den nötigen Freiraum mit "sp" eingeben */
when nw == 'pk' then
do
if notex < 3 then
do
notex = bakx
zz = zz - zdist
call ppm_SetSize(25)
box#id = ppm_CreateBox(notex+0.4, yw+zz+0.26-yv, 0.3, 0.9, 0)
call ppm_SetSize(20)
call ppm_TextIntoBox(box#id, 'd')
end
else
do
call ppm_SetSize(25)
box#id = ppm_CreateBox(notex-xw+0.4, yw+zz+0.26-yv, 0.3, 0.9, 0)
call ppm_SetSize(20)
call ppm_TextIntoBox(box#id, 'd')
end
select
when nn == '1' then
do
xw = xg
notex = notex+xw
end
when nn == '2' then
do
xw = xg/2
notex = notex+xw
end
when nn == '4' then
do
xw = xg/4
notex = notex+xw
end
when nn == '8' then
do
xw = xg/8
notex = notex+xw
end
when nn == '16' then
do
xw = xg/16
notex = notex+xw
end
when nn == 't' then
do
xw = 0.2
notex = notex+xw
end
otherwise notenwert()
end
if notex >=18.7 then
do
notex = 2.5
zz = zz + zdist
end
px = notex - 4
py = zz-1
if px < 0 then px = 0
call ppm_SetPagePosition(px, p